package com.fy.common.model.im;

/**
 * 用户终端设备在线信息维护
 *
 * //登录后请按照 redis hash   （RedisModulePrefix.USER_ONLINE_STATUS_ + user_id , mac）  的形式 存入用户token
 * //其他字段会在建立长连接的时候维护
 *
 */
public class UserOnlineStatus {

    private Long userId;
    private String lastOnlineHost;    //最后一次在线地址
    private Integer protocolType;     //使用何种通讯协议
    private Integer deviceType;       //终端设备类型
    private String deviceCode;               //设备mac地址,用于标识设备的唯一性
    private String token;             //每个设备的身份认证信息
    private String phushId;           //用于离线推送的id
    private int isOnline;         //是否在线
    private Long lastOnlineTime;      //最后一次离线时间
    private Long lastLoginTime;       //最后一次登录时间

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getLastOnlineHost() {
        return lastOnlineHost;
    }

    public void setLastOnlineHost(String lastOnlineHost) {
        this.lastOnlineHost = lastOnlineHost;
    }

    public Integer getProtocolType() {
        return protocolType;
    }

    public void setProtocolType(Integer protocolType) {
        this.protocolType = protocolType;
    }

    public Integer getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(Integer deviceType) {
        this.deviceType = deviceType;
    }

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getPhushId() {
        return phushId;
    }

    public void setPhushId(String phushId) {
        this.phushId = phushId;
    }

    public int getIsOnline() {
        return isOnline;
    }

    public void setIsOnline(int isOnline) {
        this.isOnline = isOnline;
    }

    public Long getLastOnlineTime() {
        return lastOnlineTime;
    }

    public void setLastOnlineTime(Long lastOnlineTime) {
        this.lastOnlineTime = lastOnlineTime;
    }

    public Long getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Long lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }
}
